#另一种写法
def webUV():

    file_name = r"C:\Users\15384\Desktop\anishell.cn.log"
    client_ip_list = []

    with open(file_name,mode="r")as fobj:
        for line in fobj:
            client_ip_list.append(line.split()[0])

    for ip in set(client_ip_list):
        print("客户端IP:%s  访问次数：%s" %(ip,client_ip_list.count(ip)))

if __name__ == '__main__':
    webUV()